package day2;

import org.junit.Test;

public class ArrayTest {
	
	//数组实例
	@Test
	public void test1() {
		
		int[] array1 = { 1,2,3,4,5 };
		int[] array = new int[9];
		array[0] = 1;
		array[1] = 1;
		array[2] = 1;
		array[3] = 1;
		
	}
	
	//数组遍历
	@Test
	public void test2() {
		
		int[] array = new int[4];
		array[0] = 1;
		array[1] = 1;
		array[2] = 1;
		array[3] = 1;
		
		for (int i = 0; i <= array.length; i++) {
			System.out.println(array[i]);
		}
		
	}
	
	
}
